package com.bestow.loan.service.impl;

import java.util.List;
import com.bestow.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bestow.loan.mapper.InvPurchaseRollOutMapper;
import com.bestow.loan.domain.InvPurchaseRollOut;
import com.bestow.loan.service.IInvPurchaseRollOutService;

/**
 * 申购账户信息Service业务层处理
 * 
 * @author liliu
 * @date 2022-09-15
 */
@Service
public class InvPurchaseRollOutServiceImpl implements IInvPurchaseRollOutService 
{
    @Autowired
    private InvPurchaseRollOutMapper invPurchaseRollOutMapper;

    /**
     * 查询申购账户信息
     * 
     * @param purchaseRollOutId 申购账户信息主键
     * @return 申购账户信息
     */
    @Override
    public InvPurchaseRollOut selectInvPurchaseRollOutByPurchaseRollOutId(Long purchaseRollOutId)
    {
        return invPurchaseRollOutMapper.selectInvPurchaseRollOutByPurchaseRollOutId(purchaseRollOutId);
    }

    /**
     * 查询申购账户信息列表
     * 
     * @param invPurchaseRollOut 申购账户信息
     * @return 申购账户信息
     */
    @Override
    public List<InvPurchaseRollOut> selectInvPurchaseRollOutList(InvPurchaseRollOut invPurchaseRollOut)
    {
        return invPurchaseRollOutMapper.selectInvPurchaseRollOutList(invPurchaseRollOut);
    }

    /**
     * 新增申购账户信息
     * 
     * @param invPurchaseRollOut 申购账户信息
     * @return 结果
     */
    @Override
    public int insertInvPurchaseRollOut(InvPurchaseRollOut invPurchaseRollOut)
    {
        invPurchaseRollOut.setCreateTime(DateUtils.getNowDate());
        return invPurchaseRollOutMapper.insertInvPurchaseRollOut(invPurchaseRollOut);
    }

    /**
     * 修改申购账户信息
     * 
     * @param invPurchaseRollOut 申购账户信息
     * @return 结果
     */
    @Override
    public int updateInvPurchaseRollOut(InvPurchaseRollOut invPurchaseRollOut)
    {
        invPurchaseRollOut.setUpdateTime(DateUtils.getNowDate());
        return invPurchaseRollOutMapper.updateInvPurchaseRollOut(invPurchaseRollOut);
    }

    /**
     * 批量删除申购账户信息
     * 
     * @param purchaseRollOutIds 需要删除的申购账户信息主键
     * @return 结果
     */
    @Override
    public int deleteInvPurchaseRollOutByPurchaseRollOutIds(Long[] purchaseRollOutIds)
    {
        return invPurchaseRollOutMapper.deleteInvPurchaseRollOutByPurchaseRollOutIds(purchaseRollOutIds);
    }

    /**
     * 删除申购账户信息信息
     * 
     * @param purchaseRollOutId 申购账户信息主键
     * @return 结果
     */
    @Override
    public int deleteInvPurchaseRollOutByPurchaseRollOutId(Long purchaseRollOutId)
    {
        return invPurchaseRollOutMapper.deleteInvPurchaseRollOutByPurchaseRollOutId(purchaseRollOutId);
    }
}
